package com.hyacinth.web.ui.ligerui;

import java.util.List;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SimplePropertyPreFilter;

public class ComboBox {
	
	public static String getTreeData(List<?> list, Class<?> c, String[] fields) {
		SimplePropertyPreFilter spp = new SimplePropertyPreFilter(c, fields);
		String str = JSON.toJSONString(list,spp);
		//System.out.println(str.replace("\"children\":[],", ""));
		return str.replace("\"children\":[],", "");
	}
}
